package CI.aufgabe2.cip.mynodes;

import java.util.List;

import CI.aufgabe2.cip.SymbolTable;
import CI.aufgabe2.cip.base.AbstractDescr;

public class MyStatementSequenceNode extends MyAbstractNode {

	private static final long serialVersionUID = 1L;

	private final List<? extends MyAbstractNode> statementList;

	public MyStatementSequenceNode(List<? extends MyAbstractNode> statementList) {
		this.statementList = statementList;
	}

	@Override
	public void print() {
		trace("StatementSequenceNode ");
		if (statementList != null)
			for (MyAbstractNode statement : statementList) {
				if (statement != null)
					statement.print();
			}

		unindent();
	}
	
    public int getCount(){
        return 0;
       }

	public AbstractDescr compile(SymbolTable sym) {
		for (MyAbstractNode node : statementList) {
			if(node != null)
				node.compile(sym);
			}

			return null;
	}

}
